﻿@model IList<WordsEntity>
@{
    ViewBag.Title = "List";
    Layout = "../Shared/_LayoutPage.cshtml";
}
@section CssLink{
    <link href="@Url.Content("~/Skins/Common/Table.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Skins/Common/Pager.css")" rel="stylesheet" type="text/css" />
}
<div data-role="header">
    <h1>
        我的单词本</h1>
</div>
<div data-role="content">
    <table class="table_blue02" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <th>
                单词
            </th>
            <th>
                韦氏分词
            </th>
            <th>
                国际音标
            </th>
            <th>
                韦氏音标
            </th>
        </tr>
        <tbody>
            @{
                int index = 0;
                foreach (var item in Model)
                {
                    index++;
                <tr @string.Format("class={0}", index % 2 != 0 ? "odd" : "even")>
                    <td>
                        @item.Word
                    </td>
                    <td>
                        @item.MWWord
                    </td>
                    <td>
                        @(string.IsNullOrEmpty(item.DJ) ? item.KK : item.DJ)
                    </td>
                    <td>
                        @item.MW
                    </td>
                </tr> 
            
                }
           
            }
            <tr>
                <td colspan="4">
                    <div class="divPager2">
                        @MvcHtmlString.Create(MvcPager.Pager((object)ViewBag.Pager))</div>
                </td>
            </tr>
        </tbody>
    </table>
</div>
